package org.ysh.core.shiro;

/**
 * 继承UsernamePasswordToken，添加验证码字段
 */
public class CaptchaUsernamePasswordToken extends org.apache.shiro.authc.UsernamePasswordToken{

    // 验证码
    private String captcha;
    public String getCaptcha() {
        return captcha;
    }

    public void setCaptcha(String captcha) {
        this.captcha = captcha;
    }

    public CaptchaUsernamePasswordToken(String username, String password, boolean rememberMe, String host, String captcha) {
        super(username, password, rememberMe, host);
        this.captcha = captcha;
    }

    public CaptchaUsernamePasswordToken(String username, String password, String captcha) {
        super(username, password, false);
        this.captcha = captcha;
    }

    public void clear() {
        super.clear();
        this.captcha = null;
    }

}
